import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 - 按条件加入到外呼任务 */
export const outboundFormRules = reactive(<FormRules>{
  sourceId: [{ required: true, message: "外呼任务为必填项", trigger: ["blur", "change"] }],
  size: [{ required: true, message: "单页条数为必填项", trigger: ["blur", "change"] }],
  page: [{ required: true, message: "页数为必填项", trigger: ["blur", "change"] }]
});

/** 自定义表单规则校验 - 按条件兑领 */
export const redemptionRules = reactive(<FormRules>{
  num: [{ required: true, message: "兑领条数为必填项", trigger: "blur" }],
  page: [{ required: true, message: "页数为必填项", trigger: "blur" }],
  labelId: [{ required: true, message: "标签为必填项", trigger: "blur" }],
});


/** 自定义表单规则校验 - 分配任务 */
export const allocateRules = reactive(<FormRules>{
  number: [{ required: true, message: "分配数量为必填项", trigger: "blur" }],
  staffId: [{ required: true, message: "目标成员为必填项", trigger: "blur" }],
});
